Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Cartesian Points
Description: Simple object representations for cartesian points.Keywords: ecl points
Tutorial Level: BEGINNER
Cartesian Point
This is a simple templatised abstraction of a cartesian/euclidean point. The template arguments are used to define the dimension and the storage type (float or double for the point.
Setters
1 // Point by point - 2d/3d specialisations only
2 CartesianPoint3d p1(0.1,0.2,0.3);
3 // From eigen vector
4 eigen::Vector3d v; v << 0.1, 0.2, 0.3;
5 CartesianPoint3d p2(v);
6 // Comma Initialisation
7 CartesianPoint3d p3;
8 p3 << 1.0, 2.0, 3.0;
9 // From api - 2d/3d specialisations only
10 CartesianPoint3d p4;
11 p4.x(1.0); p4.y(2.0); p4.z(3.0);
Accessors
Error Handling
The class will throw exceptions in debug mode if ranges are exceeded at any time (comma initisalisations, operator []).